from utility.pgsql_manager import PgSqlManager

pgDB = PgSqlManager().get_instance()
# 档案表sql模型
class ArchivesModel(pgDB.Model):
    __tablename__ = 'res_archives'
    id = pgDB.Column(pgDB.Integer, primary_key=True, doc='档案Id')
    create_uid = pgDB.Column(pgDB.Integer)
    write_uid = pgDB.Column(pgDB.Integer)
    mq_age = pgDB.Column(pgDB.Integer)
    jd_dw = pgDB.Column(pgDB.Integer)
    jd_ys = pgDB.Column(pgDB.Integer)
    yz = pgDB.Column(pgDB.Integer)
    hospital_id = pgDB.Column(pgDB.Integer)
    mq_xm = pgDB.Column(pgDB.String(10))
    img_url = pgDB.Column(pgDB.String)
    check_progress = pgDB.Column(pgDB.String)
    jbzlid = pgDB.Column(pgDB.String)
    mq_id_type = pgDB.Column(pgDB.String)
    mq_sfz = pgDB.Column(pgDB.String)
    mq_mz = pgDB.Column(pgDB.String)
    mq_xx = pgDB.Column(pgDB.String)
    mq_rhyx = pgDB.Column(pgDB.String)
    mq_zy = pgDB.Column(pgDB.String)
    mq_sjhm = pgDB.Column(pgDB.String)
    mq_hyzk = pgDB.Column(pgDB.String)
    mq_hjlx = pgDB.Column(pgDB.String)

    mq_hj_province = pgDB.Column(pgDB.Integer)
    mq_hj_city = pgDB.Column(pgDB.Integer)
    mq_hj_county = pgDB.Column(pgDB.Integer)
    mq_hj_town = pgDB.Column(pgDB.Integer)
    mq_hj_village = pgDB.Column(pgDB.Integer)
    mq_hj_address = pgDB.Column(pgDB.String)
    mq_jt_province = pgDB.Column(pgDB.Integer)
    mq_jt_city = pgDB.Column(pgDB.Integer)
    mq_jt_county = pgDB.Column(pgDB.Integer)
    mq_jt_town = pgDB.Column(pgDB.Integer)
    mq_jt_village = pgDB.Column(pgDB.Integer)
    mq_jt_address = pgDB.Column(pgDB.String)
    mq_cz_province = pgDB.Column(pgDB.Integer)
    mq_cz_city = pgDB.Column(pgDB.Integer)
    mq_cz_county = pgDB.Column(pgDB.Integer)
    mq_cz_town = pgDB.Column(pgDB.Integer)
    mq_cz_village = pgDB.Column(pgDB.Integer)
    mq_cz_address = pgDB.Column(pgDB.String)

    mq_qmjkjc = pgDB.Column(pgDB.String)
    mq_jbggws = pgDB.Column(pgDB.String)
    mq_ldrk = pgDB.Column(pgDB.String)
    mq_djny = pgDB.Column(pgDB.String)
    fq_xm = pgDB.Column(pgDB.String)
    fq_zjlx = pgDB.Column(pgDB.String)
    fq_zjhm = pgDB.Column(pgDB.String)
    fq_sjhm = pgDB.Column(pgDB.String)
    fq_mz = pgDB.Column(pgDB.String)
    fq_zy = pgDB.Column(pgDB.String)
    jd_sfby = pgDB.Column(pgDB.String)
    jd_yy = pgDB.Column(pgDB.String)
    jd_qd = pgDB.Column(pgDB.String)
    max_gwys = pgDB.Column(pgDB.String)
    ks = pgDB.Column(pgDB.String)
    mzh = pgDB.Column(pgDB.String)
    zyh = pgDB.Column(pgDB.String)
    bed = pgDB.Column(pgDB.String)
    hl_dj = pgDB.Column(pgDB.String)
    status = pgDB.Column(pgDB.String)
    mq_csrq = pgDB.Column(pgDB.Date)
    fq_csrq = pgDB.Column(pgDB.Date)
    sccjrq = pgDB.Column(pgDB.Date)
    mcyjsj = pgDB.Column(pgDB.Date)
    create_date = pgDB.Column(pgDB.Integer)
    write_date = pgDB.Column(pgDB.Integer)
    jd_date = pgDB.Column(pgDB.Integer)
